package com.example.nettyproject;

import com.example.nettyproject.config.NettyServer;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class NettyProjectApplication {

    public static void main(String[] args) {
        SpringApplication.run(NettyProjectApplication.class, args);
        run();
    }

    private static NettyServer nettyServer = new NettyServer();

    private static void run(){
        Thread thread = new Thread(new Runnable() {
            @Override
            public void run() {
                nettyServer.run();
            }
        });
        thread.start();
    }
}
